﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="wall.aspx.vb" Inherits="wallpapers" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">



<head id="Head1" runat="server">
    <title>Wallpapers Page</title>
    
    
   <script type="text/javascript">
   
   
   function makeW(id) {
   
   window.parent.setWall(id)
   
   }
   
     
    </script>
    
    <link rel="stylesheet" type="text/css"href="stylesheets/menu.css" />
    
</head>
<body>
 
    	

    <form id="form1" runat="server">
    <div>
    
    	

	<%

	    Dim fileSystem = Server.CreateObject("Scripting.FileSystemObject")
	    Dim folderContent = fileSystem.GetFolder(Server.MapPath("\") & "images\wallpapers")

	    Response.Write("<ul>")

	    For Each fileName In folderContent.Files

	        Response.Write("<li>" & fileName.Name)
	   
	    Next

	    Response.Write("</ul>")

	%>

	
    
    
            <div>
            <div onclick="makeW(0)" style="cursor:pointer">        
                <img  src="images/wallpapers/0.jpg" alt="Wallpaper 1" width="160" height="105" />
                <div>Wallpaper 0</div>
              </div>    
            </div>
    
    
            <div>
            <div onclick="makeW(1)" style="cursor:pointer">        
                <img  src="images/wallpapers/1.jpg" alt="Wallpaper 2" width="160" height="105" />
                <div>Wallpaper 1</div>
              </div>    
            </div>
    
    
            <div>
            <div onclick="makeW(2)" style="cursor:pointer">        
                <img  src="images/wallpapers/2.jpg" alt="Wallpaper 1" width="160" height="105" />
                <div>Wallpaper 2</div>
              </div>    
            </div>
    
    </div>
    </form>
   
</body>
</html>
